A non-volatile dual in-line memory module (NVDIMM) is a random access memory (RAM) of a computer. The NVDIMM may include a plurality of non-volatile memory (NVM) chips. The NVDIMM can still store complete memory data when a system is completely powered off. It may be understood that the NVM chip on the NVDIMM may be a non-volatile RAM (NVRAM). The NVM on the NVDIMM may include a phase change memory (PCM), a resistive RAM (RRAM), a magnetic RAM (MRAM), a spin-transfer torque MRAM (STT-MRAM), or the like. The NVDIMM communicates with a memory controller using the NVDIMM-P protocol. The NVDIMM-P protocol is a bus access protocol compatible with the double data rate (DDR) protocol.
A person skilled in the art may know that, a processor usually has a read requirement for reading data with different length. Therefore, the processor may send access requests for reading data with different length to the memory controller. For example, the processor may send, based on a requirement, an access request for reading 64 Byets (B) data or an access request for reading 128 B data to the memory controller. In other approaches, the memory controller usually sends a read command for reading fixed-length data to the NVDIMM. For example, in one case, the memory controller may send a read command for reading 64 B data to the NVDIMM. In this case, when the memory controller receives an access request that is sent by the processor and used to read 128 B data, the memory controller needs to split the access request into two 64 B data read commands, and read, from the NVDIMM using the two read commands, the 128 B data required by the processor. Such a processing manner wastes bandwidth of a command bus, and affects system performance. In another case, the memory controller sends only a read command for reading 128 B data to the NVDIMM. In this case, when the memory controller receives an access request that is sent by the processor and used to read 64 B data, the memory controller needs to change the access request for 64 B data to a read command for 128 B data, and sends the read command for 128 B data to the NVDIMM. This manner wastes bandwidth of a data bus.